package org.xteam.sled.semantic.exp;

public class ExpVar extends Exp {

	private String name;

	public ExpVar(String name) {
		this.name = name;
	}

	public String name() {
		return name;
	}
	
	public boolean equals(Object o) {
		if (o instanceof ExpVar)
			return ((ExpVar)o).name.equals(name);
		return false;
	}
	
	public int hashCode() {
		return name.hashCode();
	}
	
	public String toString() {
		return name;
	}

	@Override
	public void visit(IExpVisitor visitor) {
		visitor.visitVar(this);
	}

}
